<div class = "ui modal">
    <i class = "close icon"></i>
    <div class = "header">
        添加数据源
    </div>
    <div class = "clearfix p15">
        <div class = "perW20 fl">
            <img src = "/trend-new-BI/assets/img/dabase.png">
        </div>
        <div class = "perW60 fl ml50" ng-show="!hasDone">
            <table class = "ui table newSourceTable" style = "border-width: 0px;">
                <tbody>
                    <tr>
                        <td class = "tr" style="width: 200px">
                            数据库类型
                        </td>
                        <td>
                            <div class = "ui selection dropdown" style = "width:400px;">
                                <input type = "hidden" name = "gender">
                                <i class = "dropdown icon"></i>
                                <div class = "default text" ng-bind = "source.type"></div>
                                <div class = "menu">
                                    <div class = "item" data-value = "mysql" ng-click = "chooseType('mysql')">mysql</div>
                                    <div class = "item" data-value = "sqlServer" ng-click = "chooseType('sqlServer')">sqlServer</div>
                                    <!-- <div class = "item" data-value = "postgresql" ng-click = "chooseType('postgresql')">postgresql</div> -->
                                    <div class = "item" data-value = "oracle" ng-click = "chooseType('oracle')">oracle</div>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class = "w200 tr">
                            数据源名称
                        </td>
                        <td>
                            <div class = "ui input">
                                <input type = "text" placeholder = "数据库名称" class = "w400" ng-model = "source.sourceDesc">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class = "tr" style="white-space: nowrap">
                            服务器IP地址
                        </td>
                        <td>
                            <div class = "ui input">
                                <input type = "text" placeholder = "服务器IP地址" class = "w400" ng-model = "source.sourceServerIp">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class = "w200 tr">
                            端口号
                        </td>
                        <td>
                            <div class = "ui input">
                                <input type = "text" placeholder = "端口号" class = "w400" ng-model = "source.portnumber">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class = "w200 tr">
                            字符编码
                        </td>
                        <td>
                            <div class = "ui selection dropdown" style = "width:400px;">
                                <input type = "hidden" name = "gender">
                                <i class = "dropdown icon"></i>
                                <div class = "default text" ng-bind = "source.characterEncoding"></div>
                                <div class = "menu">
                                    <div class = "item" data-value = "utf8" ng-click = "chooseEncoding('utf8')">utf8</div>
                                    <div class = "item" data-value = "gbk" ng-click = "chooseEncoding('gbk')">gbk</div>
                                    <div class = "item" data-value = "gb2312" ng-click = "chooseEncoding('gb2312')">gb2312</div>
                                    <div class = "item" data-value = "ascii" ng-click = "chooseEncoding('ascii')">ascii</div>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class = "w200 tr">
                            用户名
                        </td>
                        <td>
                            <div class = "ui input">
                                <input type = "text" placeholder = "用户名" class = "w400" ng-model = "source.sourceUserName">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class = "w200 tr">
                            密码
                        </td>
                        <td>
                            <div class = "ui input">
                                <input type = "password" placeholder = "密码" class = "w400" ng-model = "source.sourcePassword">
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class = "perW60 fl ml50" ng-show="hasDone">
            <div class="mt20 tc">
                <h3>继续添加数据源
                    <button class="ui right labeled icon button small" ng-click="showThis()"><i class="right arrow icon"></i> 添加数据源 </button>
                </h3>
                <h3 class="mt20">去添加表
                    <button class="ui right labeled icon button small green" ng-click="showAddTable()"><i class="right arrow icon"></i> 添加表 </button>
                </h3>
            </div>

        </div>
    </div>
    <div class = "actions" ng-show="!hasDone">
        <div class="fl ml10 mt10" style="color:red;max-width: 380px;text-align: left" ng-show="msg!=''">{{msg}}</div>
        <div class = "ui default button" ng-click="clearAllInput()">
            清空
        </div>
        <div class = "ui default deny button">
            取消
        </div>
        <button class = "ui green right labeled icon button" ng-click = "addSource($event)">
            <span>连接数据源</span>
            <i class = "checkmark icon"></i>
        </button>
    </div>
</div>